<template>
	<view class="sections">
		<StoryItem v-for="(story,index) in sections.stories" :key="story.id" :story="story" />
		<view class="no-more">没有更多了</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				sections: []
			};
		},
		onLoad(options) {
			uni.request({
				url: "https://apis.netstart.cn/zhihudaily/section/" + options.id,
				success: (res) => {
					this.sections = res.data
					
					// 设置标题
					uni.setNavigationBarTitle({
						title: this.sections.name + " · 合集" 
					})
				}
			})
		}
	}
</script>

<style lang="less">
	.sections {
		.no-more {
			height: 100rpx;
			background-color: lightgray;
			text-align: center;
			line-height: 100rpx;
			color: gray;
		}
	}

</style>
